package elven.d.web.event.listener;

import org.springframework.context.ApplicationEvent;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

import elven.d.common.log.LogFactory;
import elven.d.web.event.hello.ContentEvent;

/**
 * 监听器,当王五监听到了之后，进行的内容
 * @author liuyongyuan
 */
@Component
public class WangWuListener implements ApplicationListener<ApplicationEvent>{

	@Override
	public void onApplicationEvent(ApplicationEvent event) {
		if(event instanceof ContentEvent){
			LogFactory.d().info("王五收到消息,内容是：{}",event.getSource());
		}
	}

}
